package com.lsl.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lsl.entity.User;
import com.lsl.mapper.UserMapper;
import com.lsl.service.UserService;

import java.util.Collections;
import java.util.List;

import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {

    @Override
    public List<User> getUsersByIds(List<Integer> ids) {
        if (ids == null || ids.isEmpty()) {
            return Collections.emptyList();
        }
        return lambdaQuery()
            .in(User::getId, ids)
            .list();
    }
}
